#include "graphsupport/graph/BiGraph.h"

BiGraph::BiGraph( int firstBipart, int secondBipart, AdjCoefType infEdge )
	: Graph( firstBipart + secondBipart, infEdge )
	, firstBipart( firstBipart )
	, secondBipart( secondBipart )
{
}

bool BiGraph::existsBiPartEdge( int first, int second )
{
	return existsEdge( first, second + firstBipart );
}

void BiGraph::initBi( int firstBipart, int secondBipart, AdjCoefType infEdge )
{
	this->Graph::init( firstBipart + secondBipart, infEdge );
	this->firstBipart = firstBipart;
	this->secondBipart = secondBipart;
}

int BiGraph::getFirstBipart()
{
	return firstBipart;
}

int BiGraph::getSecondBipart()
{
	return secondBipart;
}
